/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ru.jSkyRoom.bridge.major;

import ru.jSkyRoom.interfaces.major.LeveledItemList;
import ru.jSkyRoom.interfaces.major.GlobalForm;
import skyproc.FormID;
import skyproc.LVLI;

/**
 *
 * @author Rakev
 */
public class LeveledItemListBridge extends LeveledBridge<LVLI> implements LeveledItemList {

    public LeveledItemListBridge(LVLI adapting) {
        super(adapting);
    }

    @Override
    public GlobalForm getGlobalForm() {
        FormID id = getRawObject().getGlobalForm();
        return getFinderFactory().createGlobalFormFinder().find(id);
    }

    @Override
    public void setGlobalForm(GlobalForm globalForm) {
        FormID id = getIdProducer().produce(globalForm);
        getRawObject().setGlobalForm(id);
    }
}
